import React from 'react';
import {
  View,
  Text,
  StyleSheet,
} from 'react-native';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import Radio from './Radio'

export default class FormRadioItem extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  render() {
    const {
      label,
      labelWidth,
    } = this.props;
    return (
      <View style={styles.item}>
        <Text
          style={[
            styles.label,
            labelWidth ? {width: labelWidth} : {width: 100},
          ]}>
          {label}
        </Text>
        <View style={{flex: 1}}>
            {this.renderInput()}
        </View>
      </View>
    );
  }
  renderInput() {
    return (
        <Radio {...this.props} checkboxStyle={{flexDirection: 'row',}}/>
    )
  }
}
const styles = StyleSheet.create({
  item: {
    flexDirection: 'row',
    marginLeft: 15,
    borderBottomWidth: 0.5,
    borderBottomColor: '#e1e1e1',
    paddingTop: 14,
    paddingBottom: 13,
  },
  content: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    paddingRight: 14,
  },
  label: {
    fontSize: 14,
  },
  inputStyle: {},
  value: {
    fontSize: 17,
    color: '#000',
    marginTop: 0,
  },
  placeholder: {
    fontSize: 17,
    color: '#a6a6a6',
  },
});
